int gcd(int a,int b)
{
    //TODO
    return 0;
}

int lcm(int a,int b)
{
    //TODO
    return 0;
}

int main()
{
    int a,b;
    while(2==scanf("%d%d",&a,&b))
        printf("%d %d\n",gcd(a,b),lcm(a,b));
    return 0;

}
